package com.dashu.base.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;

@Component
@Configuration
public class AppConfiguration {

    @LoadBalanced   // 负载均衡(该注解标记使用哪种负载均衡策略)
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}